#if defined(_MSC_VER)
#pragma once
#endif

#ifndef LM_TEXTURE_CONSTANT_H
#define LM_TEXTURE_CONSTANT_H

#include "../core/lm.h"
#include "../core/texture.h"

template<typename T>
class ConstantTexture: public Texture<T> {
public:
	ConstantTexture(const T &v) { value = v; }
	T Evaluate(const Intersection &isect) const {
		return value;
	}
	//~ConstantTexture() { }
private:
	T value;
};

#endif	// LM_TEXTURE_CONSTANT_H